Borland Online And The Cobb Group Present:


January, 1995 - Vol. 2 No. 1

Borland C++ 4.0 IDE - Using File Manager with the IDE

If you've been using Windows for very long, you've probably experimented with the drag-and-drop technology that Microsoft designed into File Manager and into Windows itself. However, you may not realize that Borland C++ 4.0 also provides support for drag-and-drop operations from File Manager. In this article, we'll show how you can take advantage of this functionality.

Kind of a drag

The Borland C++ Integrated Development Environment (IDE) supports two drag-and-drop operations from the Windows File Manager:

To see these operations in action, let's work through a simple example.

Dropping like files

Begin by launching the Borland C++ IDE. If the IDE's main window appears as a full-screen window (the window's borders aren't visible), click the double-arrow icon in the upper-right corner of the window and resize the window to the lower half of the screen. Then, minimize this window by clicking the down-arrow icon that appears near the upper-right corner of the screen.

Next, open the Windows File Manager. If File Manager's main window appears as a full-screen window, click its double arrow icon and resize it to the upper half of the screen.

Now, double-click on the BC4 folder in the folder list that appears on the left side of File Manager's disk view window. When the contents of the BC4 directory appear in the file list on the right side of the window, click on the README.TXT file's icon, drag it over the IDE's minimized icon, and drop it there, as shown in Figure A.


Figure A - You can open a file by dropping it on the IDE's minimized icon.

When you release the mouse button, the IDE will reopen, and you'll see the README.TXT file in an open editor window. Close the README.TXT file by double-clicking on its System menu icon.

Now, choose Open Project File from the Project menu. In the Open Project File dialog box, enter

\BC4\EXAMPLES\DOS\DOSEXAMP.IDE

and click OK. If you can't see the project window for DOSEXAMP.IDE when the project opens, choose Project from the View menu, then use the main window's vertical scroll bar to make the project window visible.

Return to the File Manager application and locate the README.TXT file icon again. This time, click on the icon and drag it over the project window that's inside the IDE's main window, as shown in Figure B. Drop the file's icon on the name Hello[.exe] in the project window to add this file to the project. To delete this new node in the project, right-click on the node, choose Delete Node from the pop-up menu, and then click Yes when the IDE asks if you want to delete the node.


Figure B - You can add a file to a project by dropping it on a node in an IDE project window.

Conclusion

Like most other professional Windows applications, the Borland C++ IDE supports drag-and-drop operations from File Manager. In addition to using this support to open source files in the IDE text editor, you can also use it to add new source files to existing projects.

Return to the Borland C++ Developer's Journal index

Subscribe to the Borland C++ Developer's Journal


Copyright (c) 1996 The Cobb Group, a division of Ziff-Davis Publishing Company. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of Ziff-Davis Publishing Company is prohibited. The Cobb Group and The Cobb Group logo are trademarks of Ziff-Davis Publishing Company.